home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
MRAC
/
Intervals
/
i-invert
< prev
next >
Wrap
Lisp/Scheme
|
1998-08-11
|
554b
|
19 lines
i-invert integer-list
This function enables a list of integers containing plus and minus values to be inverted; minus values becoming plus and vice versa.
(setq int1
(cfunction
(gen-noise-white 12 .1 .5) (g-integer -11 11)))
=> (-1 7 11 8 8 -8 -1 -2 7 0 1 -11)
(i-invert int1)
=> (1 -7 -11 -8 -8 8 1 2 -7 0 -1 11)
(setq int2
(cf-noise-white '(6 6 6) 1.0 .37 (g-integer -11 11)))
=> ((-11 -6 11 4 -11 10) (-6 11 4 -11 10 -8) (11 4 -11 10 -8 11))
(i-invert int2)
=> ((11 6 -11 -4 11 -10) (6 -11 -4 11 -10 8) (-11 -4 11 -10 8 -11))